/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.sdd.plains;

import java.io.Serializable;
import java.util.List;

/**
 *
 * @author tpgalan
 */
public class CategoryPlain implements Serializable{
    private Long categoryId;
    private String name;
    private List<CategoryPlain> subcategories;

    /**
     * @return the categoryId
     */
    public Long getCategoryId() {
        return categoryId;
    }

    /**
     * @param categoryId the categoryId to set
     */
    public void setCategoryId(Long categoryId) {
        this.categoryId = categoryId;
    }

    /**
     * @return the name
     */
    public String getName() {
        return name;
    }

    /**
     * @param name the name to set
     */
    public void setName(String name) {
        this.name = name;
    }

    /**
     * @return the subcategories
     */
    public List<CategoryPlain> getSubcategories() {
        return subcategories;
    }

    /**
     * @param subcategories the subcategories to set
     */
    public void setSubcategories(List<CategoryPlain> subcategories) {
        this.subcategories = subcategories;
    }

    @Override
    public String toString() {
        return "CategoryPlain{" + "categoryId=" + categoryId + ", name=" + name + ", subcategories=" + subcategories + '}';
    }

    @Override
    public boolean equals(Object obj) {
        if (obj == null) {
            return false;
        }
        if (getClass() != obj.getClass()) {
            return false;
        }
        final CategoryPlain other = (CategoryPlain) obj;
        if (this.categoryId != other.categoryId && (this.categoryId == null || !this.categoryId.equals(other.categoryId))) {
            return false;
        }
        return true;
    }

    @Override
    public int hashCode() {
        int hash = 7;
        return hash;
    }

    
    
    
    
}
